/* TODO body-level declarations should only be on stream page */
body, html {
  height: 100%;
  margin: 0;
  padding: 0;
}
body.br-ui-embed {
  background-color: transparent;
}

.BookReader {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}
/* Using position fixed, requires a full-screen to book reader.
 * Still not sure if we want to assume always full screen.  */
body.br-ui-embed .BRcontainer {
  position: relative;
  width: 100%;
  height: 100%;
}

#IABookReaderWrapper,
.IABookReaderWrapper {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0.1px 0 0 0;
  overflow:hidden;
}
#IABookReaderMessageWrapper,
.IABookReaderMessageWrapper {
  /* inline-block is a hack to prevent margin collapsing */
  display:inline-block;
  width: 100%;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.428571429;
}
#BRbookcover,
.BRbookcover {
    background-image: none;
}
.BookReaderMessage {
  text-align: center;
  color: white;
  background: #222;
  padding: 5px;
}
.BookReaderMessageHead {
  margin-right: 10px;
  margin-top: 1px;
  font-size: 1.3em;
  font-weight: 700;
  display: inline-block;
  vertical-align: middle;
}
.BookReaderMessageBody {
  display: inline-block;
}
.BookReaderMessageFoot {
  margin: 4px 0;
}
.BookReaderMessage button {
  font-size: 1.1em;
  margin: 0 2px;
  min-width: 100px;
  margin: 3px 4px 0 4px;
}
.BookReader .muted {
  color: grey;
}
.BookReaderMessage .muted {
  color: #ccc;
}

.BRtoolbar .BRpill.download {
  background-image: url("BookReader/images/icon_download.png");
  background-repeat: no-repeat;
  background-position: 8px center;
  background-size: 12px;
  padding-left: 30px;
}
.BRtoolbar .BRpill.return {
  background-image: url("BookReader/images/icon_return.png");
  background-repeat: no-repeat;
  background-position: 8px center;
  background-size: 15px;
  padding-left: 30px;
}
.BRtoolbarSectionDownload,
.BRtoolbarSectionLending {
  text-align: center;
}

/* EXPERIMENT: removing the show/hide button */
/*
.BRnavCntlBtm {
  display: none;
}
.fullscreenActive .BRnavCntlBtm{
  display: block;
}
*/

/* Placeholder text */
.BookReaderPlaceholder {
  font-size: 16px;
  line-height: 22px;
  padding: 40px;
  text-align: center;
  width:100%;
  height:100%;
  background-color: white;
  box-sizing: border-box;
}
#br-loading-placeholder img,
.br-loading-placeholder img {
  margin-top: 20px;
}

@media (max-width: 400px) {
  .BookReaderMessageHead {
    margin: 0 0 0 5px;
    font-size: 1.2em;
  }
  .BookReaderMessage button {
    -webkit-appearance: initial;
    min-width:100px;
    padding: 8px;
    margin: 4px 4px 0 4px;
  }
}

/* mid size */
@media (max-width: 1050px) {
  .BRtoolbar .BRpill.download {
    padding-left: 0;
    background-position: 12px center;
    width: 40px;
  }
  .BRtoolbar .BRpill.return {
    padding-left: 0;
    background-position: 12px center;
    width: 40px;
  }
  .BRpill.download .BRpillInner, .BRpill.return .BRpillInner {
    display: none;
  }
}


/**** Lending styles ****/

.BRpagediv1up, .BRpageimage, .BRpagedivthumb {
  -moz-user-select: none;
  -webkit-user-select: none;
}

@media print {
  .BRpagediv1up, .BRpageimage, .BRpagedivthumb {
      display: none;
  }
}

.fieldset-share-pageview, .share-embed-prompt,
.fieldset-embed, .open-to-this-page {
  display: none !important;
}

.IABookReaderLoader {
  background-image: url('/upload/images/tree/loading.gif');
  background-position: center center;
  background-repeat: no-repeat;
  display: inline-block;
  width: 16px;
  height: 16px;
  position: absolute;
  margin-top: 10px;
  margin-right: 14px;
  margin-left: 5px;
}

.IABookReaderMessageWrapper .IABookReaderLoader {
  margin-top: 11px;
  margin-right: 14px;
  margin-left: 8px;
}

.BRmobileMenu .IABookReaderLoader {
  margin-top: 0;
  margin-right: 0;
  margin-left: 5px;
}

.print-disability-link {
  background-image: url("static/pd-daisy.svg");
  background-repeat: no-repeat;
  background-size: 2rem;
  background-position-y: .2rem;
  padding-left: 2.5rem;
  margin-left: 0.5rem;
  display: inline-block;
}

/* Until we have the download links on the details page, we still show toolbar option */
.BRlending #theatre-ia-wrap .BRtoolbarSectionLending,
.BRaccess #theatre-ia-wrap .BRtoolbarSectionLending,
.BRlending #theatre-ia-wrap .BRtoolbarSectionTitle,
.BRaccess #theatre-ia-wrap .BRtoolbarSectionTitle {
  display: inline;
}

.IABookReaderPreviewOverlayWrapper {
  display: block;
  text-align: center;
}
.IABookReaderPreviewOverlay {
  background: #2b2b2b;
  color: #eee;
  display: inline-block;
  padding: 2px 7px;
  margin-top: 6px;
  font-style: italic;
  letter-spacing: 0.5px;
  position: relative;
}

/* Mobile Only */
@media (max-width: 600px) {
  .IABookReaderMessageWrapper .IABookReaderLoader {
    margin-top: 14px;
    margin-right: 14px;
    margin-left: 4px;
  }
}

/**** /stream/ page styles ******/

.BookReaderRoot .BRicon.full {
  display: none;
}
.BookReaderRoot .ui-embed .BRicon.full {
  display: inline;
}


/****** Details page styles *****/
/* note, !imporant is needed, because archive.css gets loaded AFTER this file. */
body.navia #theatre-ia > .row {
  max-width: 100% !important;
}
body.navia #theatre-ia-wrap {
  min-height: 100px !important;
}
#theatre-ia {
  padding: 0 !important;
}
#theatre-ia-wrap {
  padding: 0;
}
#theatre-ia-wrap #BookReader {
  height: 80vh;
}
#theatre-ia-wrap #BookReader.fullscreenActive {
  height: 100%;
}
#theatre-ia-wrap #BookReader.fullscreenActive {
  height: 100%;
}
#theatre-ia-wrap .BRtoolbarSectionInfo,
#theatre-ia-wrap .BRtoolbarSectionTitle,
#theatre-ia-wrap .BRtoolbarSectionLending,
#theatre-ia-wrap .BRtoolbarSectionDownload {
  display: none;
}
#theatre-ia-wrap .fullscreenActive .BRtoolbarSectionTitle {
  display: inline;
}
@media (max-width: 800px) {
  #theatre-ia-wrap #BookReader {
    height: 100vw;
  }
}

/** Preview styles */
.BRpreview .BRtoolbar {
  padding: 0;
}
@media (min-width: 801px) {
  .BRpreview .fullscreenActive .BRtoolbar {
    padding: 10px 10px 4px 10px;
  }
}

.BookReaderThumbnail,
.BookReaderTextsIcon {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 80%;
  transform: translate(-50%, -50%);
}

body.navia .container-ia .iconochive-texts.BookReaderTextsIcon {
  font-size: 200px;
  color: #333333;
}

body.navia .container-ia .iconochive-texts.BookReaderTextsIcon:before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
